package com.lzq.Injector;

/**
 * 自定义 SQL 注入方法描述
 * @author pengrx
 */
public enum CacSqlMethod {

    INSERT_BATCH("insertBatch", "批量插入", "<script>\nINSERT INTO %s %s VALUES %s\n</script>"),

    INSERT_OR_UPDATE_BY_ID("insertOrUpdateById", "插入或更新", "<script>\ninsert into %s %s values %s on duplicate key update %s\n</script>"),

    INSERT_OR_UPDATE_BY_ID_BATCH("insertOrUpdateByIdBatch", "批量插入或更新", "<script>\ninsert into %s %s values %s on duplicate key update %s\n</script>");

    private final String method;
    private final String desc;
    private final String sql;

    CacSqlMethod(String method, String desc, String sql) {
        this.method = method;
        this.desc = desc;
        this.sql = sql;
    }

    public String getMethod() {
        return method;
    }

    public String getDesc() {
        return desc;
    }

    public String getSql() {
        return sql;
    }
}
